package arbore;
import visitors.Visitor;

public class Nod extends NodAbstract {
	protected NodAbstract nodS;
	protected NodAbstract nodD;
	protected int x;
	
	public Nod(int x) {
		this.x=x;
	}
	public Nod(int x, NodAbstract s, NodAbstract d) {
		this.x=x;
		this.nodS=s;
		this.nodD=d;
	}
	public NodAbstract getNodS() {
		return nodS;
	}
	
	public void setNodS(Nod nodS){
		this.nodS=nodS;
	}
	public NodAbstract getNodD() {
		return nodD;
	}
	
	public void setNodD(Nod nodD){
		this.nodD=nodD;
	}
	public int getX(){
		return x;
	}
	public void setX(int x){
		this.x=x;
	}
	
	public String toString(){
		return " "+x+" ";
	}
	public void acceptVisitor(Visitor v) {
		v.visit(this);		
	}
	
}
